<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS事件</title>
</head>
<body>
    <button onclick="click_envent()">这是一个点击事件按钮</button>
    <input onfocus="focus_event()" onblur="onblur_event()" placeholder="请输入内容" type="text">
    <script>
        // 点击事件
        function click_envent(){
            alert('点击了事件');
        }
        //聚焦事件
        function focus_event(){
            console.log('获取焦点');
        }
        // 失去焦点事件
     function   onblur_event(){
            console.log('失去焦点');
        }
    </script>
</body>
</html>